<!--<?php print <<<EOT
-->
<script language="javascript">
	var charset = '$db_charset';
	var imgpath   = '$imgpath';
	var stylepath = '$stylepath';
	function addsmile(NewCode){
	    document.FORM.atc_content.value += ' [s:'+NewCode+'] ';
	}
	
	var version = navigator.appVersion.split(";");
	version = version[1].replace(/[ ]/g,"");
	if (navigator.appName == "Microsoft Internet Explorer" && version=="MSIE6.0") {
		window.onerror = function () {return true;}
	}
</script>
<!--
EOT;
if(R_P==D_P){print <<<EOT
-->
					<script language="JavaScript" src="data/bbscache/face.js"></script>
<!--
EOT;
}else{
$facedb=readover(D_P."data/bbscache/face.js");
print <<<EOT
-->
					<script language="JavaScript">
					$facedb
					</script>
<!--
EOT;
}print <<<EOT
-->
<div id="menu_show" style="display:none;"></div>
<div id="menu_face" class="menu" style="display:none;"></div>
<script language="JavaScript" src="js/post.js"></script>
<div id="comment_container">
<form method="POST" name="FORM" action="" onsubmit="return false;">
    <div class="minieitor_pw cc">
        <ul class="miniUl">
            <li><a href="javascript:" title="插入url链接" class="milink_pw" onClick="createLinkBox();" id="createlinkid">插入url链接</a></li>
            <li><a href="javascript:" title="添加表情" class="mishow_pw" id="td_face" onClick="showDefault();" unselectable="on">添加表情</a></li>
        </ul>
        <div class="minitextarea">
            <textarea maxlength="200" id="comm_input_{$comment_type}_{$comment_typeid}_0" name="atc_content"></textarea>
        <div class="c"></div>
        </div>
        <div class="c"></div>
    </div>
    <span class="btn" style="margin:0 15px 0 0;"><span><button type="submit" onclick="PW_Comment.sendComment('$comment_type',$comment_typeid,0,2);">提 交</button></span></span>
<div id="linkbox" style="display:none;"></div>
</form>
		<div class="mb10 c">&nbsp;</div>
						<div class="dlA">
						<div id="createcommentbox"></div>
<!--
EOT;
foreach ($commentdb as $key => $comment) {print <<<EOT
-->
								<dl class="cc dl" id="comment_{$comment[id]}">
									<dt class="dt"><a href="u.php?uid=$comment[uid]" class="img_50"><img src="$comment[face]" width="44" height="44" /></a></dt>
									<dd class="dd">
<!--
EOT;
if ($comment[uid]==$winduid || $winduid==$u || $groupid==3) { print <<<EOT
-->
									<a style="cursor: pointer;" onclick="pwConfirm('是否确定删除本条回复',this,function(){ajax.send('apps.php?q=ajax&a=commdel','id=$comment[id]',PW_Comment.delOneCommentResponse);});" title="删除" class="adel">删除</a>
<!--
EOT;
} print <<<EOT
-->
									<p class="title"><a href="u.php?uid=$comment[uid]" class="mr5">$comment[username]</a>：$comment[title] </p>
									<cite class="gray">$comment[postdate]</cite> - 
<!--
EOT;
if ($comment[uid]==$winduid||$winduid) { print <<<EOT
-->
									<a style="cursor:pointer;" class="reA" onclick="PW_Comment.createCommentInput('$comment_type',$comment_typeid,$comment[id])">回复</a>
<!--
EOT;
} print <<<EOT
-->
											<div id="commentbox_{$comment_typeid}_{$comment[id]}">
											<div id="subcommentlist_{$comment_type}_{$comment[id]}">
<!--
EOT;
foreach ($subcommentdb[$comment['id']] as $k => $subcomment) {print <<<EOT
-->
											<dl class="cc dl2" id="comment_{$subcomment[id]}">
												<dt><a href="u.php?uid=$subcomment[uid]"><img src="$subcomment[face]" width="30" height="30" /></a></dt>
												<dd>
<!--
EOT;
if ($subcomment['uid'] == $winduid || $groupid == 3) {print <<<EOT
-->
<a href="javascript:;" class="adel" onclick="pwConfirm('是否确定删除本条回复',this,function(){ajax.send('apps.php?q=ajax&a=commdel','id=$k',PW_Comment.delOneCommentResponse);});" >删除</a>
<!--
EOT;
}print <<<EOT
-->
											<p class="mb5 f14"><a href="u.php?uid=$subcomment[uid]" class="mr5">$subcomment[username]</a>：$subcomment[title]</p>
											<cite class="gray">$subcomment[postdate]</cite>
											</dd>
											</dl>	
<!--
EOT;
}print <<<EOT
-->
											</div>
											<div id="comment_input_diary_{$comment_typeid}_{$comment[id]}" style="display:none;">
												<dl class="cc dl2">
													<dd style="padding-left:0;"><input type="text" id="comm_input_diary_{$comment_typeid}_{$comment[id]}" class="input input_wb" name="title" maxlength="200"><span class="btn2"><span><button  type="button" onclick="PW_Comment.sendComment('diary','$comment_typeid','$comment[id]','3');">回复</button></span></span>
													</dd>
												</dl>
											</div>
										</div>
									</dd>

								</dl>
<!--
EOT;
}print <<<EOT
-->
						</div>
<div class="mt10 cc">$pages</div>
</div>
<!--
EOT;
?>